package com.smart.model.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author zhanghong
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("项目临时任务Add请求模型")
public class ProjectTempTaskAddRequest implements Serializable {
    @NotEmpty(message = "任务名称不能为空")
    @ApiModelProperty("任务名称")
    private String name;
    @NotEmpty(message = "任务编号不能为空")
    @ApiModelProperty("任务编号")
    private String taskNum;
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("提交开始时间yyyy-MM-dd")
    private Date startTime;
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("提交结束时间yyyy-MM-dd")
    private Date endTime;
    @ApiModelProperty("信息项列表")
    private List<ProjectItemAddRequest> items;
}
